Tested in Python 3.6.5 

In the sample code, to draw the received pulse waveform, it is required to install Matplotlib.
Easiest way to install matplotlib is to use pip. Type following command in terminal:
    pip install matplotlib